﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pharmacy.Ultilities
{
    public partial class Constant
    {
        #region Configuration database
        /// <summary>
        /// Constant value: "server={0};database={1};user id={2};password={3}".
        /// </summary>
        public const string CONNNECTION_STRING = @"data source={0};initial catalog={1};Persist Security Info=True;User ID={2};Password={3};multipleactiveresultsets=True;App=EntityFramework"; //"server={0};database={1};user id={2};password={3}";
        public const string KEY_SERVER = "ServerName";
        public const string KEY_DATABASE = "DatabaseName";
        public const string KEY_USERID = "UserID";
        public const string KEY_PASSWORD = "Password";
        #endregion

        #region Config DateFilter
        public const string DATEFILTERRANGE_SECTION_NAME = "DateFilterRange";
        public const string DATEFILTERRANGE_KEY_NAME = "Filter";
        public const string DATEFILTERRANGE_KEY_VALUE = "DateFilter";
        public const string DATEFILTERRANGE_OPTIONCHOICE = "OptionChoice";
        public const string DATEFILTERRANGE_FROMDATE = "FromDate";
        public const string DATEFILTERRANGE_TODATE = "ToDate";
        public const string DATEFILTERRANGE_INLASTDAYS = "InLastDays";
        #endregion

        #region Common Config
        public const string DIO_CommonConfigSqlSelect = @"SELECT [RID]
                              ,[sectionName]
                              ,[entryAttributeKey]
                              ,[entryAttributeKeyValue]
                              ,[entryAttributeName]
                              ,[Key]
                              ,[attributeName]
                              ,[Value]
                          FROM [CommonConfig]";
        public const string DIO_CommonConfigSqlInsert = @"INSERT INTO [CommonConfig]
                                                       (
                                                        [RID]
                                                       ,[sectionName]
                                                       ,[entryAttributeKey]
                                                       ,[entryAttributeKeyValue]
                                                       ,[entryAttributeName]
                                                       ,[Key]
                                                       ,[Value]
                                                       ,[attributeName])
                                                 VALUES
                                                       (@RID
                                                       ,@sectionName
                                                       ,@entryAttributeKey
                                                       ,@entryAttributeKeyValue
                                                       ,@entryAttributeName
                                                       ,@Key
                                                       ,@Value
                                                       ,@attributeName)";
        public const string DIO_CommonConfigSqlUpdate = @"Update [CommonConfig]
                                          Set
                                           [Value] = @Value
                                          WHERE RID = @RID";
        public const string DIO_CommonConfigSqlCreate = @"CREATE TABLE [dbo].[CommonConfig](
	                                                        [RID] [uniqueidentifier] NOT NULL,
	                                                        [sectionName] [nvarchar](200) NULL,
	                                                        [entryAttributeKey] [nvarchar](200) NULL,
	                                                        [entryAttributeKeyValue] [nvarchar](200) NULL,
	                                                        [entryAttributeName] [nvarchar](200) NULL,
	                                                        [Key] [nvarchar](200) NULL,
	                                                        [attributeName] [nvarchar](200) NULL,
	                                                        [Value] [nvarchar](1000) NULL,
                                                         CONSTRAINT [PK_CommonConfig] PRIMARY KEY CLUSTERED 
                                                        (
	                                                        [RID] ASC
                                                        )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
                                                        ) ON [PRIMARY]";
        public const string DIO_CommonConfigSqlCreateAlterDefault = @"ALTER TABLE [dbo].[CommonConfig] ADD  CONSTRAINT [DF_CommonConfig_RID]  DEFAULT (newid()) FOR [RID]";
        #endregion

        public const string CURRENTLANGUAGE = "CurrentLanguage";
        public const string SKINSTYLE = "SkinStyle";

        #region Key Message
        public const string KEY_EMPTYINFORMATION = "EmptyInformation";
        public const string KEY_INVALIDINFORMATION = "InvalidInformation";
        public const string KEY_PASSWORDTEXT = "PasswordText";
        public const string KEY_USERNAMETEXT = "UserNameText";
        public const string KEY_INVALIDSTRINGLENGTH = "InvalidStringLength";
        public const string KEY_OBJECTISDELETED = "ObjectIsDeleted";
        public const string KEY_GREATERTHAN = "GreaterThanMessage";
        public const string KEY_LESSTHAN = "LessThanMessage";
        public const string KEY_MASTERITEMMAXQTYINSTOCK = "Pharmacy.Data.Entity.MasterItemMaxQtyInStock";
        public const string KEY_MASTERITEMMINQTYINSTOCK = "Pharmacy.Data.Entity.MasterItemMinQtyInStock";
        public const string KEY_DELETEOBJECTINTRANSACTION = "DeleteObjectInTransaction";
	#endregion        
    
        #region Numeric Format
        public const int iDecimalPrecision = 28;
        public const int iDecimalScale = 4;
        public const int iDecimalPrecision18 = 18;
        public const int iDecimalScale2 = 2;
        #endregion

        #region Entity Name
        public const string ENT_CUSTOMER = "Pharmacy.Data.Entity.Customer";
        public const string ENT_CUSTOMERGROUP = "Pharmacy.Data.Entity.CustomerGroup";
        public const string ENT_CUSTOMERNAME = "Pharmacy.Data.Entity.CustomerName";
        public const string ENT_CUSTOMERNUMBER = "Pharmacy.Data.Entity.CustomerNumber";
        public const string ENT_MANUFACTURER = "Pharmacy.Data.Entity.Manufacturer";
        public const string ENT_MANUFACTURERGROUP = "Pharmacy.Data.Entity.ManufacturerGroup";
        public const string ENT_MANUFACTURERNAME = "Pharmacy.Data.Entity.ManufacturerName";
        public const string ENT_MANUFACTURERNUMBER = "Pharmacy.Data.Entity.ManufacturerNumber";
        public const string ENT_MASTERITEMGROUP = "Pharmacy.Data.Entity.MasterItemGroup";
        public const string ENT_VENDOR = "Pharmacy.Data.Entity.Vendor";
        public const string ENT_VENDORGROUP = "Pharmacy.Data.Entity.VendorGroup";
        public const string ENT_VENDORNAME = "Pharmacy.Data.Entity.VendorName";
        public const string ENT_VENDORNUMBER = "Pharmacy.Data.Entity.VendorNumber";
        public const string ENT_EMPLOYEEGROUP = "Pharmacy.Data.Entity.EmployeeGroup";
        public const string ENT_EMPLOYEE = "Pharmacy.Data.Entity.Employee";
        public const string ENT_EMPLOYEENAME = "Pharmacy.Data.Entity.EmployeeName";
        public const string ENT_EMPLOYEENUMBER = "Pharmacy.Data.Entity.EmployeeNumber";
        public const string ENT_MASTERITEM = "Pharmacy.Data.Entity.MasterItem";
        public const string ENT_MASTERITEMNAME = "Pharmacy.Data.Entity.MasterItemName";
        public const string ENT_MASTERITEMNUMBER = "Pharmacy.Data.Entity.MasterItemERPItemCode";
        public const string ENT_UNITOFMEASURE = "Pharmacy.Data.Entity.UnitOfMeasure";
        public const string ENT_UOMCONVERSION = "Pharmacy.Data.Entity.UOMConversion";
        public const string ENT_PHARMACEUTICALFORM = "Pharmacy.Data.Entity.PharmaceuticalForm";
        public const string ENT_CATEGORY = "Pharmacy.Data.Entity.Category";
        public const string ENT_COUNTRY = "Pharmacy.Data.Entity.Country";
        public const string ENT_MASTERLOCATION = "Pharmacy.Data.Entity.MasterLocation";
        public const string ENT_MASTERLOCATIONNAME = "Pharmacy.Data.Entity.MasterLocationName";
        public const string ENT_MASTERLOCATIONNUMBER = "Pharmacy.Data.Entity.MasterLocationNumber";
        public const string ENT_PHIEUBAOGIA = "Pharmacy.Data.Entity.PhieuBaoGia";
        public const string ENT_PHIEUDATHANG = "Pharmacy.Data.Entity.PhieuDatHang"; 
        #endregion

        #region Generator Type Name
        public const string GENERATOR_MANUFACTURER = "DIoms.IdentityGenerator.ManufacturerGenerator";
        public const string GENERATOR_VENDOR = "DIoms.IdentityGenerator.VendorGenerator";
        public const string GENERATOR_CUSTOMER = "DIoms.IdentityGenerator.CustomerGenerator";
        public const string GENERATOR_EMPLOYEE = "DIoms.IdentityGenerator.EmployeeGenerator";
        public const string GENERATOR_MASTERITEM = "DIoms.IdentityGenerator.MasterItemGenerator";
        public const string GENERATOR_PHIEUBAOGIA = "DIoms.IdentityGenerator.PhieuBaoGiaGenerator";
        public const string GENERATOR_MASTERLOCATION = "DIoms.IdentityGenerator.MasterLocationGenerator";
        public const string GENERATOR_PHIEUDATHANG = "DIoms.IdentityGenerator.PhieuDatHangGenerator";
        #endregion

    }
}
